//
//  ReachabilityTool.m
//  AQBPolice
//
//  Created by apple on 2017/7/21.
//  Copyright © 2017年 eight. All rights reserved.
//

#import "ReachabilityTool.h"

@implementation ReachabilityTool

+ (NSString *)getReachability {
    
    
    //1.创建网络监听管理者
    AFNetworkReachabilityManager *manager = [AFNetworkReachabilityManager sharedManager];
    
    //2.监听网络状态的改变
    /*
     AFNetworkReachabilityStatusUnknown     = 未知
     AFNetworkReachabilityStatusNotReachable   = 没有网络
     AFNetworkReachabilityStatusReachableViaWWAN = 3G
     AFNetworkReachabilityStatusReachableViaWiFi = WIFI
     */
    NSString *status = [manager localizedNetworkReachabilityStatusString];
    
    //3.开始监听
    [manager startMonitoring];
    return status;
}


@end
